package com.aceitunaproject.server.test;

import java.util.Properties;

import com.sun.sgs.test.util.SgsTestNode;

/**
 * Helper class providing functionality shared across unit tests
 * 
 * @author Maciej Miechowicz
 */
public class SgsTestNodeHelper {

	/**
	 * Returns default properties for Aceituna project test applications
	 * 
	 * @param applicationName application name
	 * @param listenerClass listener class
	 * @return default properties
	 * @throws Exception if an error occurs
	 */
	public static Properties getDefaultProperties(String applicationName, Class<?> listenerClass)
	throws Exception
	{
		Properties props = 
            SgsTestNode.getDefaultProperties(applicationName, null, listenerClass);

		props.put("com.sun.sgs.services", "com.aceitunaproject.server.player.PlayerServiceImpl");
		props.put("com.sun.sgs.managers", "com.aceitunaproject.server.player.PlayerManagerImpl");

		return props;
	}
	
}
